package cn.myspringboot.system.mapper;

import cn.myspringboot.base.mapper.BaseMapper;
import cn.myspringboot.user.domain.Role;
import cn.myspringboot.user.query.RoleQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    List<Role> selectRolePage(RoleQuery query);
    List<Long> selectMenuIdList(Long id);
    Role fingRole(Role role);
    List<Long> selectPermissionIdList(Long id);
    void addRolePermission(@Param("id") Long id, @Param("permissions") List<Long> permissions);
    void addRoleMenu(@Param("id") Long id, @Param("menus") List<Long> menus);
    void deletePreByRoleId(Long id);
    void deleteMenuByRoleId(Long id);
}
